<?php include("includes/session.php"); ?>
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title><?php echo $lang['PAGE_TITLE_ADMIN_CATEGORIES']; ?></title>
<?php include("header.php"); ?>
	<center>
	<table cellpadding="0" cellspacing="0" width="80%">
	<tr>
		<td align="left">
			<?php 
			if($session->userlevel <= 1)
			{
				echo "<center><h2>Restricted Area</h2></center>";
			}
			else
			{
			?>
			<br /><br />
			<center>
			<table cellpadding="10" cellspacing="0" class="border">
			<tr><td class="title" align="left"><?php echo $lang['ADMIN_CAT_ADD']; ?></td></tr>
			<tr>
				<td>
				<form action="includes/process.php" method="POST">
				<table cellspacing="0" cellpadding="3">
				<tr>
					<td align="right"><b><?php echo $lang['CATEGORY_TYPE']; ?></b></td>
					<td>
					<select name="type">
					<option value="Knowledge" <?php if($form->value("type")=="Knowledge"){ echo "selected=\"selected\""; } ?>>Knowledge</option>
					<option value="Ability" <?php if($form->value("type")=="Ability"){ echo "selected=\"selected\""; } ?>>Ability</option>
					<option value="Commodity" <?php if($form->value("type")=="Commodity"){ echo "selected=\"selected\""; } ?>>Commodity</option>
					<option value="Transportation" <?php if($form->value("type")=="Transportation"){ echo "selected=\"selected\""; } ?>>Transportation</option>
					<option value="Raw Materials" <?php if($form->value("type")=="Raw Materials"){ echo "selected=\"selected\""; } ?>>Raw Materials</option>
					<option value="Land" <?php if($form->value("type")=="Land"){ echo "selected=\"selected\""; } ?>>Land</option>
					</select>
					</td>
				</tr>
				<tr>
					<td align="right"><?php echo $lang['CATEGORY']; ?></td>
					<td><input type="text" name="category" maxlength="30" size="25" value="<? echo $form->value("category"); ?>" style="background-color: #bcc6e1;"></td>
					<td><? echo $form->error("category"); ?></td>
				</tr>
				<tr>
					<td colspan="2" align="right">
						<input type="hidden" name="subAddCategory" value="1">
						<input type="submit" value="Add Category">
					</td>
				</tr>
				</table>
				</form>
				</td>
			</tr>
			</table>
			</center>
			<br /><br />
			<center>
			<table cellpadding="0" cellspacing="0">
			<tr>
				<td class="topLeft"></td><td bgcolor="#dadada"></td><td class="topRight"></td>
			</tr>
			<tr bgcolor="#dadada">
			<td></td><td>
			<center><h2><?php echo $lang['RESOURCES_CATEGORIES']; ?></h2></center>
			<?php displayCategories(); ?>
			</td><td></td>
			</tr>
			<tr>
				<td class="bottomLeft"></td><td bgcolor="#dadada"></td><td class="bottomRight"></td>
			</tr>
			</table>
			</center>
			<?php
			}
			?>
		</td>
	</tr>
	</table>
	</center>
<?php include("footer.php"); ?>